import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";
import { Login } from "../interface";

// 登錄
export const loginCheck = (params: Login.ReqLoginForm) => http.post<Login.ResLogin>(PORT1 + `/login/check`, params);

// 获取用户信息(微信)
export const wxAuthGetUser = (params: { code: string }) => http.post<Login.ResLogin>(PORT1 + `/wxAuth/getUser`, params);

// 登出
export const loginOut = () => http.post(PORT1 + `/login/out`);

// 查询用户权限
export const userGetAuthBySysUser = (params: { username: string }) =>
  http.get<Login.ResAuth>(PORT1 + `/user/getAuthBySysUser`, params);

// 用户修改密码
export const paramsUpPasswordByUser = (params: { username: string }) => http.get(PORT1 + `/user/upPasswordByUser`, params);
